#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int fun(int a[][3], int m, int n)
{
	int i, j, k;
	for (i = 0; i < n; i++)
	{
		k = 0;
		for (j = 0; j < m; j++)
			k = +a[j][i];
	}
	return k;
}

int main()
{
	int a[2][3] = { {3,5,6},{2,4,7} };

	printf("%d\n", fun(a, 2, 3));
	return 0;
}